"""
URL configuration for studentV4 project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.contrib import admin
from django.urls import path,include
from student import views
from django.conf import settings
from django.conf.urls.static import static
from foodCook import views as cook
from teacherCertification import views as Parper
from baiduMap import views as baiduMap
from material import views as vmaterial
# from usermanage import



urlpatterns = [
    path('admin/', admin.site.urls),
    path('students/', views.get_students),#获取所有学生信息
    path('students/query/', views.query_students),#查询学生信息
    path('sno/check/',views.is_exsits_sno),#检查学号是否存在
    path('add/student/',views.add_student),#新增学生信息
    path('edit/student/',views.edit_student),#编辑学生信息
    path('delete/student/',views.delete_student),#删除学生信息
    path('delete/students/',views.delete_students),#批量删除学生信息
    path('upload/',views.upload_file),#上传文件
    path('foodcooks/',cook.get_foodcooks),#获取所有食谱信息
    path('addFoodCook/',cook.add_foodcooks),#添加食谱
    path('getPage/',cook.getPage_foodcooks),#按分页获取食谱数据
    path('CookUpload/',cook.upload_file),#上传文件
    path('cook/check/',cook.is_exsits_cookName),#检查食谱
    path('edit/cook/',cook.edit_cook),#编辑食谱信息
    path('query/cook/', cook.query_cooks),  # 条件查询食谱信息
    path('query/parper/',Parper.query_parper),#查询数据
    path('add/parper/',Parper.add_questions),#添加数据
    path('delete/parper/',Parper.delete_question),# 单条删除数据
    path('edit/parper/',Parper.edit_question),# 单条删除数据
    path('questionUpload/',Parper.upload_file),#上传问题截图
    path('map/searchBase/',baiduMap.baiduSearchData),#百度地图关键词搜索
    path('material/add/',vmaterial.add_material),#新增原料属性
    path('material/files/',vmaterial.upload_file),#上传文件
    path('material/search/',vmaterial.search_Data), #查询单条数据详情

    path('user/',include('usermanage.urls')),
]
# 允许所有的上传文件被放置在MEDIA接口访问读取
urlpatterns+=static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)

